//
//  iComeSDKProtocol.h
//  AFNetworking
//
//  Created by zhangrongwu on 2018/1/19.
//

#import <Foundation/Foundation.h>

typedef void(^SDKProtocolHandler)(id result);

@protocol iComeSDKProtocol <NSObject>

@required
/**
 * 向聊天控制器注册cell 格式如下
 * return @[@{@"class":@"UITableViewCell", @"id":@"10000"},@{@"class":@"UITableViewCell1", @"id":@"10001"}];
 */
- (NSArray<NSDictionary *> *)registerAdaptItemClass;
@optional
/**
 * 针对业务方自定义的cell(本项目中消息类型为1000以上的会回调该方法)，tableview提供的点击方法回调
 * result 为sdk提供给业务方的点击获取的所有参数，具体参数可自定义
 */
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath select:(id)result;


// 打开通讯录
- (void)openContactsFromViewC:(UIViewController *)fromViewC;
// param @{@"gId":@"",@"data":data}
- (void)openNewsDetailFromViewC:(UIViewController *)fromViewC :(id)param;
// 打开个人详情
- (void)openContactsDetailsFromViewC:(UIViewController *)fromViewC :(id)param;

// 测试使用 icomekernel不需实现
- (void)createGroupUsersFromViewC:(UIViewController *)fromViewC :(SDKProtocolHandler)users;//员工@[@{"eId":@"xxxx",@"eName":@"xxxx"},@{"eId":@"xxxx",@"eName":@"xxxx"}]
- (void)createGroupDepartmentFromViewC:(UIViewController *)fromViewC :(SDKProtocolHandler)department;//部门@[@{"oId":@"xxxx",@"gName":@"xxxx"}]
- (void)appendGroupUsersFromViewC:(UIViewController *)fromViewC :(SDKProtocolHandler)users;//员工@[@{"eId":@"xxxx",@"eName":@"xxxx"},@{"eId":@"xxxx",@"eName":@"xxxx"}]

/**
 * 用于web页面与业务方开发
 * web页面通过调用system.openNativeMethod方法与业务方进行直接交互
 * params web页面提供给业务方的参数
 * callBack 业务方如果有需求进行回调，则调用callBack方法回调
 */
- (void)openWebViewNativeMethodsWithParams:(id)params :(UIViewController *)fromViewC :(SDKProtocolHandler)callBack;

@end
